require 'test/unit'

class Test_UserInfo < Test::Unit::TestCase
	def test_new
		user = UserInfo.new("name", "ticket")
		assert_equal("name", user.name)
		assert_equal("ticket", user.ticket)
	end
	def test_to_s
		user = UserInfo.new("name", "ticket")
		assert_equal("[name=name, ticket=ticket]", user.to_s)
		assert_equal("UserInfo[name=name, ticket=ticket]", user.inspect)
	end
	def test_immutable
		user = UserInfo.new("name", "ticket")
		assert_raise(NoMethodError) { user.name = "hoge" }
		assert_raise(NoMethodError) { user.ticket = "hoge" }
	end
end

